{% extends 'home/public/index.html' %}


{% block title %}
<title>我的订单</title>
{% endblock %}

{% block css %}

<link rel="stylesheet" type="text/css" href="/static/home/css/order.css">
<link rel="stylesheet" type="text/css" href="/static/home/css/order-app.css">
        
{% endblock %}


{% block con %}
<!-- 导航 E-->
<!-- 主内容区域 -->
<div class="mainbody order">
    <div class="container">
        <!-- 面包屑导航 -->
        <div class="crumbs col-xs-12 col-sm-12">
            <ol class="breadcrumb">
                <li class="hidden-xs hidden-sm">首页</li>
                <li class="active">我的订单</li>
            </ol>
        </div>
        <!-- 面包屑导航 E-->
        <div class="main clearfix">
            <!-- 左侧导航 -->
            <div class="left-nav f-fl col-md-4 hidden-xs hidden-sm">
                <div class="nav-main">
                    <a href="javascript:;" class="type-title">
                        <span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span>订单中心
                    </a>
                    <a href="/myorder/" class="ml active">我的订单</a>
                    
                    <a href="javascript:;" class="type-title">
                        <span class="glyphicon glyphicon-user" aria-hidden="true"></span>个人中心
                    </a>
                    <a href="{% url 'myhome_dizhi' %}" class="ml ">地址管理</a>                    
                    <a href="{% url 'myhome_xinxi' %}" class="ml ">个人信息</a>
                </div>
            </div>
            <!-- 左侧导航 E-->
            <!-- 右侧内容展示 -->
            <div class="right-content f-fr col-md-8 col-xs-12 col-sm-12">
                <div class="order-main">
                    <div class="type-tab-btn">
                        <a href="{% url 'myhome_myorder' %}?status=-1"  {% if biao == "-1" %} class=" active" {% endif %} data-type="-1">全部订单</a>
                        <i class="line hidden-xs hidden-sm">|</i>
                        <a href="{% url 'myhome_myorder' %}?status=0"  {% if biao == "0" %} class=" active" {% endif %}  data-type="0">代付款</a>
                        <i class="line hidden-xs hidden-sm">|</i>

                        <a href="{% url 'myhome_myorder' %}?status=1"  {% if biao == "1" %} class=" active" {% endif %}  data-type="1">代发货</a>
                        <i class="line hidden-xs hidden-sm">|</i>

                        <a href="{% url 'myhome_myorder' %}?status=2"  {% if biao == "2" %} class=" active" {% endif %}  data-type="2">已发货</a>
                        <i class="line hidden-xs hidden-sm">|</i>

                        <a href="{% url 'myhome_myorder' %}?status=3"  {% if biao == "3" %} class=" active" {% endif %}  data-type="3">已取消订单</a>
                    </div>
                    <div class="list-head hidden-xs hidden-sm">
                        <ul class="clearfix">
                            <li class="w50">
                                订单明细
                            </li>
                            <li class="w125">.</li>
                            <li class="w125">金额</li>
                            <li class="w125">状态</li>
                        </ul>
                    </div>

                    <div id="tableList" class="type-contain ui-load-container">
                        <div class="ui-load-content">
                            <input id="unPayNum" value="0" type="hidden">
                            <table class="orderItem">
                                <tbody>
                                <!-- 遍历每一个订单 在每一个次遍历里  在遍历该订单的详细订单 -->
                                {% for v in orderlist %}
                                    <tr class="trHead hidden-xs hidden-sm">
                                        <td colspan="4" class="title clearfix">
                                            <div class="f-fl">
                                                下单时间：<span class="time">{{ v.addtime|date:'Y-m-d H:i:s' }}</span>
                                                订单号：<span class="orderNumber">{{ v.id }}</span>
                                            </div>
                                        </td>
                                    </tr>
                                {% for vv in v.orederinfo_set.all %}
                                    <tr class="list-box b-l b-r b-b">
                                        <td class="list b-r j-iamCart">
                                            <div class="cart-wrap j-CartWrap">
                                                <div class="shop j-shop j-amLight">
                                                    <div class="item b-t clearfix j-item j-iamMain">
                                                        <a class="productDetail nameWidth col-xs-4 col-sm-4"  target="_blank">
                                                            <img src="{{ vv.goodsid.pic }}" class="f-fl">
                                                        </a>
                                                        <div class="describe f-fl col-xs-8 col-sm-8">
                                                            <div class="vertic clearfix">
                                                                <span class="clearfix">
                                                                    <a class="productDetail nameWidth"target="_blank">
                                                                        <i>{{ vv.goodsid.title }}</i>
                                                                    </a>
                                                                    <p>￥{{ vv.price }}x{{ vv.num }}</p>
                                                                </span>
                                                            </div>
                                                        </div>                                                                
                                                    </div>
                                                
                                                </div>
                                            </div>                                        
                                        </td>
                                        
                                        <td class="b-r w125 center price b-t hidden-xs hidden-sm">
                                            <div class="priceDiv">￥ {{ v.totalprice }}
                                            </div>
                                        </td>
                                        <td class="b-r w125 center state b-t hidden-xs hidden-sm">
                                            <div class="stateDiv">
                                                <div>
                                                    {% if v.status == 0 %}
                                                        代付款
                                                    {% elif v.status == 1 %}
                                                        已付款,代发货
                                                    {% elif v.status == 2 %}
                                                        待收货
                                                    {% elif v.status == 3 %}
                                                        已取消
                                                    {% endif %}
                                                    <br>
                                                </div>
                                            </div>
                                        </td>                                    
                                    </tr>
                                {% endfor %}
                                {% endfor %}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}


{% block script %}
<script type="text/javascript">
        //登录图片鼠标经过
        topLogin();
        backTop();      
</script>
{% endblock %}}